<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<% String path = request.getContextPath();
	request.setAttribute("path",path);%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>考勤管理系统 - 修改在职员工信息</title>
	<meta name="keywords" content="">
	<meta name="description" content="">

	<link rel="shortcut icon" href="favicon.ico">
	<link href="${path}/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
	<link href="${path}/css/font-awesome.css?v=4.4.0" rel="stylesheet">

	<!-- Data Tables -->
	<link href="${path}/css/plugins/dataTables/dataTables.bootstrap.css"
		  rel="stylesheet">
	<link href="${path}/css/animate.css" rel="stylesheet">
	<link href="${path}/css/style.css?v=4.1.0" rel="stylesheet">

</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>修改在职员工信息</h5>
				</div>
				<div class="ibox-content">
					<form method="post" class="form-horizontal" id="commentForm" action="${path}/updateServlet">
						<%--							<c:forEach items="${employee}" var="employee">--%>
						<div class="form-group">
							<label class="col-sm-3 control-label">工号</label>
							<div class="col-sm-7">
								<%--									<input type="hidden" value="${employee.id}">--%>
								<input type="text" class="form-control" name="employeeNumber" value="${employee.employee_number}" readonly="readonly">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">姓名</label>
							<div class="col-sm-7">
								<input type="text" class="form-control" name="name" value="${employee.name}" minlength="2" required>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">密码</label>
							<div class="col-sm-7">
								<%--									<input type="password" class="form-control" name="password" value="${employee.password}" minlength="4" required>--%>
								<input type="password" class="form-control" name="password" value="${employee.password}" minlength="4" required>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">性别</label>
							<div class="col-sm-7">
								<div class="radio i-checks">
									<label><input type="radio" name="gender" value="男" <c:if test="${employee.gender=='男'}">checked</c:if>/>男</label>
									<label><input type="radio" name="gender" value="女" <c:if test="${employee.gender=='女'}">checked</c:if>/>女</label>
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">出生年月</label>
							<div class="col-sm-7">
								<input type="date" class="form-control" name="brithday" value="${employee.birthday}" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label" >联系方式</label>
							<div class="col-sm-7">
								<input type="text" class="form-control" name="telephone" value="${employee.telephone}">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">邮箱</label>
							<div class="col-sm-7" >
								<input type="text" class="form-control" placeholder="" name="email" value="${employee.email}" email="true">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">籍贯</label>
							<div class="col-sm-7">
								<input type="text" class="form-control" name="address" value="${employee.address}">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">学历</label>
							<div class="col-sm-7">
								<input type="text" class="form-control" name="education" value="${employee.education}">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">部门</label>
							<div class="col-sm-7">
								<select class="form-control m-b" name="departmentNumber" size="1" required>
									<c:forEach items="${buMen}" var="bumen" varStatus="d">
										<option value="${bumen.departmentNumber}" >${bumen.name}</option>
									</c:forEach>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">职称</label>
							<div class="col-sm-7">
								<select class="form-control m-b" name="positionNumber" size="1" required>
									<c:forEach items="${zhiCheng}" var="zhiCheng" varStatus="p">
										<option value="${zhiCheng.positionNumber}" >${zhiCheng.name}</option>
									</c:forEach>
								</select>
							</div>
						</div>
						<%--							<div class="form-group">--%>
						<%--								<label class="col-sm-3 control-label">状态</label>--%>
						<%--								<div class="col-sm-7">--%>
						<%--									<select class="form-control m-b" name="status" size="1">--%>
						<%--										<option value="在职">在职</option>--%>
						<%--										<option value="退休">退休</option>--%>
						<%--										<option value="离职">离职</option>--%>
						<%--									</select>--%>
						<%--								</div>--%>
						<%--							</div>--%>
						<div class="form-group">
							<label class="col-sm-3 control-label">备注</label>
							<div class="col-sm-7">
								<input type="text" class="form-control" name="notes" value="${employee.notes}">
							</div>
						</div>
						<div class="hr-line-dashed"></div>
						<div class="form-group">
							<div class="col-sm-4 col-sm-offset-8">
								<button class="btn btn-primary" type="submit">修&nbsp;&nbsp;改</button>&nbsp;&nbsp;&nbsp;&nbsp;
								<button class="btn btn-white" type="reset" onclick="location='${path}/EmployeeList'">取&nbsp;&nbsp;消</button>
							</div>
						</div>
						<%--							</c:forEach>--%>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>

<!-- 全局js -->
<script src="${path}/js/jquery.min.js?v=2.1.4"></script>
<script src="${path}/js/bootstrap.min.js?v=3.3.6"></script>
<script src="${path}/js/plugins/jeditable/jquery.jeditable.js"></script>

<!-- Data Tables -->
<script src="${path}/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="${path}/js/plugins/dataTables/dataTables.bootstrap.js"></script>

<!-- 自定义js -->
<script src="${path}/js/content.js?v=1.0.0"></script>

<!-- 表单验证 -->
<script src="${path}/js/plugins/validate/jquery.validate.min.js"></script>
<script src="${path}/js/plugins/validate/messages_zh.min.js"></script>

<!-- layer javascript -->
<script src="${path}/js/plugins/layer/layer.min.js"></script>
<script>
	$().ready(function() {
		$("#commentForm").validate();
	});
	$.validator.setDefaults({
		submitHandler: function() {
			parent.layer.msg('修改成功！',{icon: 1});
			form.submit();
		}
	});
</script>

</body>
</html>
